Remove item using indexΒΆ
A.pop(i)
Remove a specified item using the index from an array.
from array import *
AI = array('i', [1, 3, 5, 7, 9])
print("Original array: " + str(AI))
# Original array: array('i', [1, 3, 5, 7, 9])
print("Remove the third item form the array:")
AI.pop(2)
print("New array: " + str(AI))
# New array: array('i', [1, 3, 7, 9])
See also: https://www.w3resource.com/python-exercises/array/python-array-exercise-11.php